home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / objc / Protocol.h < prev    next >
Text File  |  1991-12-20  |  884b  |  44 lines

  1. /*
  2.     Protocol.h
  3.     Copyright 1991 NeXT, Inc.
  4. */
  5.  
  6. #ifndef _OBJC_PROTOCOL_H_
  7. #define _OBJC_PROTOCOL_H_
  8.  
  9. #import <objc/Object.h>
  10.  
  11. struct objc_method_description {
  12.     SEL name;
  13.     char *types;
  14. };
  15. struct objc_method_description_list {
  16.         int count;
  17.         struct objc_method_description list[1];
  18. };
  19.  
  20. @interface Protocol : Object
  21. {
  22. @private
  23.     char *protocol_name;
  24.      struct objc_protocol_list *protocol_list;
  25.       struct objc_method_description_list *instance_methods, *class_methods; 
  26. }
  27.  
  28. /* Obtaining attributes intrinsic to the protocol */
  29.  
  30. - (const char *)name;
  31.  
  32. /* Testing protocol conformance */
  33.  
  34. - (BOOL) conformsTo: (Protocol *)aProtocolObject;
  35.  
  36. /* Looking up information specific to a protocol */
  37.  
  38. - (struct objc_method_description *) descriptionForInstanceMethod:(SEL)aSel;
  39. - (struct objc_method_description *) descriptionForClassMethod:(SEL)aSel;
  40.  
  41. @end
  42.  
  43. #endif /* _OBJC_PROTOCOL_H_ */
  44.